import service from '@/utils/request'

// 获取UUID列表
export const getUUIDList = (params) => {
  return service({
    url: '/uuid/list',
    method: 'get',
    params
  })
}
export const renewUUID = (data) => {
  return service({
    url: '/uuid/renew',
    method: 'post',
    data
  })
}


// 创建UUID
export const createUUID = (data) => {
  return service({
    url: '/uuid/create',
    method: 'post',
    data
  })
}

// 更新UUID
export const updateUUID = (data) => {
  return service({
    url: '/uuid/update',
    method: 'post',
    data
  })
}

// 删除UUID
export const deleteUUID = (uuid) => {
  return service({
    url: '/uuid/delete',
    method: 'delete',
    params: { uuid }
  })
}

// 验证UUID
export const validateUUID = (uuid) => {
  return service({
    url: '/uuid/validate',
    method: 'get',
    params: { uuid }
  })
} 

// 获取UUID续费记录
export const getUUIDRenewalRecords = (uuid) => {
  return service({
    url: '/uuid/renewal-records',
    method: 'get',
    params: { uuid }
  })
}

// 获取UUID导出数据（包含续费信息）
export const getUUIDExportData = (params) => {
  return service({
    url: '/uuid/export-data',
    method: 'get',
    params
  })
}

// 重置所有UUID的当日访问次数
export const resetDailyAccess = () => {
  return service({
    url: '/uuid/reset-daily-access',
    method: 'post'
  })
}